Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the sizes of a number of streams & futures #158

Merged
merged 13 commits into from
Jul 10, 2024
Merged

Reduce the sizes of a number of streams & futures #158

merged 13 commits into from
Jul 10, 2024

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Jul 10, 2024

By replacing async_stream with a combination of "manually implemented" streams and various stream combinators, along with some other changes, this PR considerably reduces the sizes of a number of stream & future types used by dandidav. In particular, the future for DandiDav::inner_handle_request() — previously the largest type in the dandidav code proper — went from 17104 bytes to 5784 bytes.

jwodder added 13 commits July 9, 2024 17:59
This reduces the sizes of many Futures by 3520 bytes each.
The net savings from this commit are 64 bytes each for various Future types.
It's not much, but I feel the code also looks cleaner now.
This reduces the sizes of many Futures by 4720 bytes each.
This reduces the sizes of various Futures by 808 bytes each.
This reduces the sizes of various Futures by 2192 bytes each.
@jwodder jwodder added the performance Efficient use of time and space label Jul 10, 2024
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 221 lines in your changes missing coverage. Please review.

Project coverage is 46.47%. Comparing base (01382ef) to head (ff44f1f).
Report is 1 commits behind head on main.

Files Patch % Lines
src/s3/streams.rs 0.00% 78 Missing ⚠️
src/dandi/streams.rs 0.00% 34 Missing ⚠️
src/streamutil.rs 0.00% 29 Missing ⚠️
src/s3/mod.rs 0.00% 24 Missing ⚠️
src/dandi/mod.rs 0.00% 23 Missing ⚠️
src/httputil.rs 0.00% 17 Missing ⚠️
src/dav/mod.rs 0.00% 13 Missing ⚠️
src/validstr.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #158      +/-   ##
==========================================
- Coverage   48.35%   46.47%   -1.88%     
==========================================
  Files          24       27       +3     
  Lines        3671     3819     +148     
==========================================
  Hits         1775     1775              
- Misses       1896     2044     +148     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jwodder jwodder merged commit 00d0714 into main Jul 10, 2024
8 of 10 checks passed
@jwodder jwodder deleted the restream branch July 10, 2024 02:13
@jwodder jwodder added the code quality Nonfunctional improvements to the codebase label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Nonfunctional improvements to the codebase performance Efficient use of time and space
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant